﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WFExtended.Twitter;

namespace WFExtended.Samples.ConsoleRun
{
    public abstract class ATwitterConsoleRun : AConsoleRun
    {
        protected string _userAccessToken;

        protected string _userAccessTokenSecret;

        protected OAuthTokens Tokens
        {
            get
            {
                OAuthTokens tokens = null;

                using (StreamReader sr = new StreamReader("c:\\twitter_token.txt"))
                {
                    tokens = new OAuthTokens()
                    {
                        ConsumerKey = sr.ReadLine(),
                        ConsumerSecret = sr.ReadLine(),
                        ApplicationAccessToken = sr.ReadLine(),
                        ApplicationAccessTokenSecret = sr.ReadLine()
                    };

                    _userAccessToken = sr.ReadLine();
                    _userAccessTokenSecret = sr.ReadLine();
                }


                return tokens;
            }
        }
    }
}
